// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import VueRouter from 'vue-router'
import HelloWorld from './components/HelloWorld'
import WordEdit from './components/WordEdit'
import ExcelEdit from './components/ExcelEdit'
Vue.config.productionTip = false

//安装router插件
Vue.use(VueRouter)

//指定路由
const router = new VueRouter({
  routes:
    [
      {
        path: '/',
        name: 'HelloWorld',
        component: HelloWorld
      }, {
        path: '/wordedit',
        name: 'WordEdit',
        component: WordEdit
      }, {
        path: '/exceledit',
        name: 'ExcelEdit',
        component: ExcelEdit
      }

    ],
  mode: 'history'// 切换为history模式
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: {
    App
  },
  template: '<App/>'

})
